<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePremiumRatiosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('premium_ratios', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('compulsory_insurance')->nullable(true)->comment('交强险');
            $table->string('commercial_insurance')->nullable(true)->comment('商业险');
            $table->string('vehicles_vessels')->nullable(true)->comment('车船税');
            $table->string('number')->nullable(true)->comment('保单号');
            $table->string('insured')->nullable(true)->comment('被保人');
            $table->string('policy_holder')->nullable(true)->comment('投保人');
            $table->string('license_plate_number')->nullable(true)->comment('车牌号');
            $table->string('j_processing_fee_ratio')->nullable(true)->comment('交强险手续费比例');
            $table->string('j_service_charge')->nullable(true)->comment('交强险手续费比例');
            $table->string('s_processing_fee_ratio')->nullable(true)->comment('商业险手续费比例');
            $table->string('s_service_charge')->nullable(true)->comment('商业险手续费比例');
            $table->string('c_service_charge')->nullable(true)->comment('车船税');
            $table->string('j_application_fee')->nullable(true)->comment('交强险申请费用');
            $table->string('s_application_fee')->nullable(true)->comment('商业险申请费用');
            $table->string('c_application_fee')->nullable(true)->comment('车船税申请费用');
            $table->string('total_cost')->nullable(true)->comment('合计费用');
            $table->unsignedBigInteger('cid')->nullable(true)->comment('绑定公司id');
            $table->unsignedBigInteger('state')->nullable(true)->comment('状态,0待处理,1已处理,2需要修改费率');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('premium_ratios');
    }
}
